#ifndef _PARAM_H_
#define _PARAM_H_

typedef enum
{
	ptype_switch = 0,
	ptype_int,
	ptype_string,
	ptype_simple
}EParamType;

typedef struct
{
	char *name;
	char *param;
	char *description;
	EParamType type;
	bool required;
	union
	{
		int intValue;
		char *strValue;
	};
	int assigned;
}TParam;

TParam param_simple(char *name, char *description, bool required);
TParam param_switch(char *name, char *description);
TParam param_normal(char *name, char *param, char *description, EParamType type);
TParam param_normal(char *name, char *param, char *description, int defaultVal);
TParam param_normal(char *name, char *param, char *description, char* defaultVal);

bool parseCommand(int argc, char **argv, TParam *paramList, int paramCount, char* extra);

#endif //_PARAM_H_